Repository navigation
[Fix-4444][admin] Scope job monitor polls to the job tenant - #4582
Open
sunlishuo25 wants to merge 2 commits into
Open
sunlishuo25 wants to merge 2 commits into
sunlishuo25 wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
A reused job monitor worker can keep another tenant's context. When Flink reports a terminal state, the tenant-filtered database update then matches no row, but monitoring stops and the job list remains RUNNING until a manual refresh.
Scope each poll to the loaded job instance's tenant and restore the caller's context afterwards. This addresses a reproducible tenant-dependent cause of the stale-status symptom in #4444 on
dev. The earlier #4451 bypass is present inv1.2.5but absent from the pinneddevbase. This change preserves the existing bypass flag; when filtering is enabled, it stays enabled.Brief change log
finally.Verify this pull request
The regression uses a loopback Flink REST fixture reporting FAILED, H2, and the production MyBatis tenant interceptor. Before the fix, the database remains RUNNING; after the fix, it becomes FAILED and the other tenant's row is unchanged. The suite fails 6 of 7 tests before the fix and passes all 7 afterwards.
Verified on JDK 11:
./mvnw -B -pl dinky-admin -am -P prod,flink-single-version,flink-1.20,maven-central -Dtest=FlinkJobTaskTest -Dsurefire.failIfNoSpecifiedTests=false -Dspotless.check.skip=true test ./mvnw -B spotless:check -P flink-allAll 47 modules in the dependent backend reactor compiled. No live YARN ResourceManager/HA deployment was exercised, and the original deployment's root cause is unconfirmed. The reproduced fault requires a wrong inherited tenant with filtering enabled; this change does not repair pre-existing inherited bypass flags.